home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
tdk_v120.zip
/
MAXINFO.DOC
< prev
next >
Wrap
Text File
|
1996-07-23
|
58KB
|
1,106 lines
───────────────────────────────────────────────────────────────────────────────
▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀
▀▀ ▀▀ ▀▀ ▀▀ ▀▀
▀▀ ▀▀ ▀▀▀ ▀▀▀▀▀ The DoorKit!
▀▀ ▀▀ ▀▀ ▀▀ ▀▀
▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀
The BBS Door Development Kit By The People - For The People!
───────────────────────────────────────────────────────────────────────────────
The ANSI/ASCII/RIP/MAX DoorKit v1.20
No Copyright Notices Expressed Or Implied
Compiled By Larry L. Athey From Numerous Sources
───────────────────────────────────────────────────────────────────────────────
Information Regarding MAX Graphics:
───────────────────────────────────
Notice is hereby given that the MAXscript, MAXterm, and Mini-MAX are all
products of BBS Utiliteez Software. No changes, additions, subtractions,
or other modifications shall be made to MAXscript without prior consent
from Larry L. Athey....This is not a legal issue, this is only a request
to prevent a standard from becoming a non-standard like so many other BBS
related products and their formats have become.
The MAXscript language is donated to the public domain and may be used in
any BBS or BBS Door 100% royalty free. The MAX Graphics development kit is
also donated to the public domain. Other graphics kits may be used as well
to support MAX Graphics so long as they follow the same palette settings
used in the InitPalette procedure in the SVGADOOR.PAS unit. You are by no
means restricted to using BGI graphics for MAX Graphics doors or utilities.
Even though MAXscript is donated to the public domain, I would appreciate
credit for the time and effort I put into designing MAXscript. Again this
is not a legal issue, it's just common courtesy. Thanks in advance!
Disclaimer:
───────────
MAXscript, MAXcontrol, MAXterm, Mini-MAX, and MAX Graphics are not copies
of, or otherwise plagiarized remote graphics methods used by any other BBS
software. Even though MAX follows 3 commands used by RIPscript and other
RIP capable BBSes, this isn't any kind of a copyright infringement of the
RIP technology. These same strings of text randomly occur in computers all
the time and according the the US Library Of Congress there is no copyright
or trademark issued to: !|1K|*|#|#|# or ! ....End of disclaimer....
Larry L. Athey
BBS Utiliteez Software
Alliance, Nebraska, USA
BBS & FAX: 308-762-2239
───────────────────────────────────────────────────────────────────────────────
What Are MAX Graphics Anyway?
─────────────────────────────
What is MAX? MAX Graphics is alternative to the inferiority of RIP and RIP2
graphics. I'm not about to plagiarize on any other graphical BBS out there,
so what I have done is devised a new SVGA graphics protocol that you can
implement into any RIP capable BBS. RIP and RIP2 simply do not offer a high
enough quality graphical user interface for the caller, yet for some reason,
people insist on supporting the RIP format in their doors and BBSes. RIP is
only an EGA graphics interface, RIP2 is only a VGA interface, MAX is a true
full SVGA graphical user interface with full digital sound capabilities!
MAX is mainly for those people that want to be able to offer a _True_ SVGA
graphical user interface to their callers without forcing them have to go
out and buy new BBS software. All you really need to do to implement MAX
Graphics into any BBS is rename or save all of the .MAX screens to .RIP and
put them where your BBS will read them. Unfortunately, BBSes with built in
local display of RIP graphics won't be able to display these screens locally.
Hey, maybe you or someone else out there will drum up the nerve to write a
BBS package that will display local MAX Graphics. <G>
The MAX graphics protocol is public domain information as well as the MAX
Graphics development kit. However, I will not release the source code to
the MAXterm terminal and sub-terminal programs. Developers can mangle and
bastardize the developer's kit all they want, they just have to make sure
their programs send and receive the correct script & control commands for
MAXterm to work for them _AND_ support the same SVGA palette settings.
There are two MAX compatible terminal programs available at this time. One
is a stand alone terminal complete with dialing directory. The other is a
"Sub-Terminal" program that you can run in a script or batch file from any
other terminal program. The reason for creating the sub-terminal is because
some people are too fond of their current program to part with it. So this
will allow them to enjoy MAX Graphics without changing terminal programs.
Anybody can create and view MAX screen files. All you need is a copy of the
MAXterm terminal or sub-terminal program and a text editor. Creating a MAX
screen is as simple as writing a graphics program in Pascal. The MAXterm
program can display screens locally and has a built in editor for creating
or modifying icons. A complete MAX Graphics drawing program will be added
in the near future.
Here is a very brief overview of what MAX graphics can provide:
───────────────────────────────────────────────────────────────
-Pascal like script language (More "English-Like" than RIPscript).
-Also uses MAXcontrol "Control Code Language" to enhance speed.
-Public domain Door/Utility Pascal 7.0 development kit.
-MAX screens can be used in any RIP capable BBS.
-All screens use 640x480 pixel resolution and 256 colors.
-Fully mouse driven graphical user interface with windows.
Window types: 1. Standard Block (Similar to MS-Windows or OS/2)
2. Invisible (Used for saving screen regions)
3. Flat Panel (A window with no title header)
4. Semi-Transparent (Looks like looking thru a window screen)
-Use of icons (Multiple sizes and styles) in screens.
-Use of buttons in screens (with or without icons).
-Use of over 200 GEM fonts in screens (Say it with me, "NO BGI FONTS!").
-Use of scrolling picklists in screens.
-Use of a text file reader in any screen.
-Use of a text editor in any screen.
-Use of entry fields (5 different types) in screens.
-Use of graphics images in screens.
-Attach VOC/MIDI/MOD sound files to buttons and screens.
-Have repeating MOD/MIDI files playing in the background.
-Fully animated 640x480x256 resolution door games.
-FreeWare MAXterm resource update door for any BBS.
-More is yet to come!
NOTE: The name MAX is in no way connected with the Maximus BBS software....
───────────────────────────────────────────────────────────────────────────────
Creating Screen Files:
──────────────────────
Unlike other graphics protocols out there, MAX Graphics does not require
you to unload $200.00 on a paint/drawing program. Even though a paint /
drawing program is considered to be a luxury, it's by no means a necessity.
Screen files can be created with nothing more than a text editor and a copy
of one of the MAXterm programs. Both MAXterm and Mini-MAX have complete
local screen viewing capabilities as well as an icon editor. If you are
familiar with the Pascal programming language, then MAXscript will be like
second nature to you. If you are not familiar with Pascal, fear not, this
will still be an easy language for you to learn. MAXscript is a very Human
Like script language. There is no need for you to learn a bunch of mundane
pipe codes or escape sequences, everything is done with simple commands and
variables. The only thing you may have a hard time getting used to is the
resolution of the screens, but that won't last for long. When I first got
into using high resolution graphics in my programs, it took me about 2 or 3
weeks to get used to 640x480x256 after working with 80x25x16 for God knows
how many years before that.
A quick example of a very basic screen file would look like this:
─────────────────────────────────────────────────────────────────
Draw_Window(100,100,630,380,1,'Welcome To MAX Graphics!')
Put_Image(150,150,'CLOUD.PCX')
Shadow_Text(350,150,5,0,2,'This Sure Beats RIP Eh?')
Small_Icon_LIB('ICONLIB.001')
Draw_Button(530,350,80,46,1,20,'Continue')
Play_Sound('FUNKY.MOD')
End_Screen()
NOTE: MAXscript commands are NOT case sensitive!
In the above example, there are 7 elements to the screen. I will refer to
them as Element #1....Element #7 in my explanation of their functions....
All commands always end with a pair of left and right parenthesis to tell
MAXterm when it has reached the end of a command string. In most commands,
the parameters or Variables are separated by commas inside of parenthesis.
Any text you wish to print, any file names you wish to define, and button
hot-keys must be declared inside of apostrophes. Those are the only rules
you have to follow with script commands. Pretty simple huh?
Element #1: This draws a window on the screen using 4 coordinates. In all
examples where specific screen coordinates are used, they will
be in the fashion of X1,Y1,X2,Y2...Your X coordinates are the
columns and the Y coordinates are the rows. In an SVGA screen,
your minimum and maximum X1,Y1,X2,Y2 coordinates are limited
to 0,0,639,479. So the window in the example shown above will
be plotted at 100,100,630,380....
But what about the other two parameters/variables? The other
two parameters are for telling MAXterm what type of window to
display and what text to place in the window header. See the
"Overview" section above for a definition of window types.
Element #2: This tells MAXterm to display a graphic image at the X1,Y1
coordinates. Graphics images can be of the PCX, BMP or JPG
format. Sorry, GIF is not supported thanks to CompuServe..
Element #3: This tells MAXterm to display a string of text at the X1,Y1
coordinates. This command tells MAXterm to make the text be
in color #5 (Magenta) with a #0 (Black) background. MAXterm's
first 15 colors in its palette match the first 15 colors in
the ANSI palette. The next parameter tells MAXterm which font
to use for the text. MAXterm has three built in fonts and can
load any font from an external GEM font file. The definitions
for the fonts are: 1 - 5x8 Bitmapped Font
2 - GEM "System" Font
3 - 8x14 ROM Resident Font
4 - User Defined External Font
The last parameter of course is the text you wish to display.
Element #4: This instructs MAXterm to change files to read it's small icon
images from. MAXterm supports Small, Medium, and Large icons.
Element #5: This tells MAXterm to draw a button on the screen at the X1,Y1
coordinates. The third parameter is the width of the button in
pixels, this might take a little time to get used to. The next
parameter, the 'C' tells MAXterm what character to send to the
BBS when this button is clicked with the mouse. The next param-
eter tells MAXterm whether or not to plot a Small Icon on the
button (1=Yes, 0=No). The next parameter is the number of the
icon in the currently selected "Small_Icon" library file. The
last parameter of course is the text to print in the button.
Element #6: This tells MAXterm to play a sound file while waiting for a
key or button press. MAXterm supports MIDI, MOD and VOC files.
Element #7: This tells MAXterm that the end of the screen file has been
sent and that it should jump into "Wait State". MAXterm has
three modes: Draw Mode, Animate, and Wait State. The command
that throws MAXterm into Draw Mode is the same command string
that a BBS or door sends to RIPterm to tell it to clear the
screen and prepare to draw a new screen. The animate mode can
only be activated in a door or BBS that was developed using
TDK or other compatible door/BBS development kit. The Animate
mode relies on Control Commands rather than Script Commands.
There you have it, a very basic example of a MAXscript screen file. As you
will see further on into this document, there are a lot more MAXscript and
MAXcontrol commands. Don't let the large number of commands intimidate you,
they are only here to provide complete flexibility in screen, door and BBS
design. Even the most sophisticated of screen files can be created using
the bare minimum of script commands.
The RIPscript Misconception:
────────────────────────────
There is one misconception you may have about this and I will clear that up
for you right now. Even though RIP's graphics are based on short strings of
these crazy obscure characters, it's not any faster. RIP graphics are all
based on "Line Drawing" methods all the way down to the BGI fonts used in
RIP graphics, there are very little, if any, predefined graphics elements
or "Graphics Primitives". You may think that first example script command
is so long that it would take longer to draw than any RIP command would....
WRONG! MAXterm and the MAX Graphics development kit already have the Window
Primitive predefined. If you were to do the same thing with RIP, you would
need to send 40....Say it with me....FORTY COMMANDS to draw a simple window
on the user's screen. To draw a Semi-Transparent window on the user's screen
you would need to send in upwards of 40,000 commands to the user because you
would have to plot out the majority of the window Pixel-By-Pixel. Now do you
see the MAX advantage?
The RIPSCRIP.DOC makes a huge deal out of the fact that their language is
not humanly readable. They claim that it is faster than other languages
they compared it against (in 1991 and before) that were humanly readable,
but they didn't have MAX at that time. They were trying to design their
language around slowpoke 2400 baud to 9600 baud modems. The truth is now
nobody (nobody in their right mind) uses any less than a 14400 baud modem.
RIP's methods still aren't that fast even with their short little cryptic
script commands. They fail to tell you that RIPscript takes anywhere from
10 times to 40 times or more of their commands to do the same thing that
you can do with one command from other languages. MAXscript is the slowest
way of communicating with MAXterm, but it is still light years faster than
RIPscript - EVEN AT 2400 BAUD!
Take a look at the RIPSCRIP.DOC some time, it's available on just about
any BBS, and see how many RIPscript commands it would take to equal just
one MAXscript command. If you really want to speed up things in MAX, you
can also use MAXcontrol commands which are basically just as cryptic as
RIPscript commands. Every MAXscript command has a MAXcontrol counterpart,
so you can sacrifice the humanly readable concept in exchange for added
display speed. It's up to you how you want to do things, but either way
you look at it - RIP graphics simply do not compare to MAX Graphics in
any way - not in speed - and most definitely not in appearance!
The Difference Between MAXscript and MAXcontrol Commands:
─────────────────────────────────────────────────────────
There are two ways of communicating with MAXterm and Mini-MAX. MAXscript is
a script language that is humanly readable and understandable. MAXcontrol
is also a script language of sorts, however it is not meant to be humanly
readable - it is low level language meant to communicate with MAXterm and
Mini-MAX at a faster rate and provide complete Host <> MAXterm interaction.
MAXscript works with MAXterm in the same manner that MOST BBS programs work
with RIPterm. Meaning, once the screen is sent - that's it. There's nothing
else that can be done in the graphics mode on the user's screen. Don't get
me wrong, I am well aware of these little RIPscript slide shows people have
drawn....Like the one where the tank runs around the screen and eventually
gets blown up. However, all the while that screen is being sent to the user,
they are forced to sit there and wait until the screen is done drawing. If
the BBS wants to send something else, the user's screen is always cleared
off so no graphics overlap each other. That's just the way most people use
RIP graphics in their BBS programs when they write them. RIP _IS_ capable
of drawing over top of previously sent screens, it's just that most people
don't design their BBS programs to work that way.
MAXcontrol works with MAXterm and Mini-MAX using a two way communications
method. MAXcontrol codes are not readable by the average Joe. A MAXcontrol
command always starts with an ASCII #255 followed by a ~ (ASCII #126) and
is terminated with another ASCII #255 to indicate the end of the command.
The actual MAXcontrol commands are placed between the ASCII #126 and the
final ASCII #255. As with MAXscript, your parameters or variables are to
be separated by commas with your text and hotkey declarations to be placed
inside of apostrophes. MAXcontrol codes may also be used in a screen file
with MAXscript commands. That kind of defeats the purpose of the MAXscript
screen files being humanly readable by others, but that's completely up to
you how you want to create your screens. You can replace any script command
with a control command to give your screens an extra speed boost. MAXterm
first looks for MAXcontrol codes, if it doesn't detect the MAXcontrol code
sequence, it will then look for MAXscript commands. All MAXscript commands
have a MAXcontrol code counterpart, see below:
MAXscript: Draw_Window(100,100,630,380,1,'Welcome To MAX Graphics!')
MAXcontrol: #255#126#128100,100,630,380,1,'Welcome To MAX Graphics!'#255
Or: ~Ç100,100,630,380,1,'Welcome To MAX Graphics!'
Keep in mind that you CANNOT put the 4 characters "#255" in a MAX screen
file or send them to the comport in your program and expect results from
it. The #255 is the ASCII value of a character. Since this character has
no actual screen image, just like the spacebar creates, the #255 is used
strictly for clarity purposes only.
In most text editors, you can add an extended key code anywhere by using
your ALT key and your numeric keypad. For example, to add an ASCII #255,
you would hold your ALT key and type 2 5 5 on the numeric keypad. After
you release the ALT key, the character will appear. This procedure also
works in most programming IDE's as well.
Notice in the "Or:" example, you can't see the ASCII character #255 but
it's still in there. Go to that line and hit your END key and you'll see
that your cursor will show up one space past the end of the line. Now you
may not believe this, but the MAXcontrol commands really are about 50% to
60% faster than MAXscript commands. The string Draw_Window( is replaced by
a single ASCII character #128. If you are a programmer, what this means is
MAXterm and Mini-MAX can use a "CASE" routine instead of an "IF THEN ELSE"
routine, which you know is a major advantage. Either way you look at it,
the command line for a MAXcontrol command is shorter, which means it will
transfer faster, it doesn't take a rocket scientist to figure that out.
───────────────────────────────────────────────────────────────────────────────
The Ins & Outs Of MAX Graphics:
───────────────────────────────
As mentioned in the above, MAXscript can be used in any BBS that supports
RIP graphics (ie: RIPscript v1.54)....When a BBS detects RIP graphics in
the remote's terminal program, it sends an ASCII #27 plus [ plus ! (!).
RIPterm will return "RIPSCRIP015410", but all most BBSes look for is to see
if there is now data available at the comport after sending that string of
text. MAXterm and Mini-MAX, they return "RIPSCRIP015400" upon reception of
the ! Autosensing command, even though they are not RIP compatible. This
is just to fool the BBS into thinking they are so the BBS can send the MAX
screen files renamed as RIP screen files.
After your BBS or door program has determined whether or not the user has
RIP capabilities, you send the string #255~#255 to the comport. Remember,
the #255 is an ASCII #255, not the 4 characters: # and 2 and 5 and 5. When
MAXterm and Mini-MAX receive this string of commands, they will return the
version number of MAXscript they support (ie: #.##)....From this point on,
you will need to tell your program that "YES" the remote caller does have
MAXscript _AND_ MAXcontrol capabilities.
Now before any RIP compatible BBS or door sends screen file data to the
remote, it sends a pair of commands to tell the remote to clear the screen
of any previously sent graphics, see below:
RIP Clear Screen: Command #1 = #13#10 (Blank Line)
Command #2 = #12#13
This basically has the same effect on MAXterm and Mini-MAX. This tells any
MAX Graphics compatible terminal program to kill all active windows on the
screen. Some RIP capable BBS programs and doors will only send the second
command, so you will have to design your programs mainly around Command #2
to clear the screen. Command #1 is mainly just to send a blank line to the
terminal program in order to prevent any possible errors.
After this command has been sent, this tells MAXterm and Mini-MAX to jump
into "Draw Mode". While the program is in Draw Mode, it will only respond
to MAXscript and MAXcontrol commands. It will completely ignore all ANSI
escape sequences and RIPscript commands at this point. From here, you must
send commands to the terminal programs to instruct them to draw items on
the screen, or jump into "Animate" or "Wait State" modes. Your screens or
must always end with an End_Screen() Or #255#126#254#255 to throw them in
to Wait State where they will display any text or ANSI escape sequences in
what is called a "Text View Window". In the case of a BBS or door program
that supports MAXcontrol codes as well as MAXscript commands, you can use
the Animate() or #255#126#253#255 command instead of the End_Screen().
In some BBS or door programs, after a RIP screen is drawn, they may create
some sort of dynamically generated text at the bottom of the screen. Some
BBS programs do this to tell the user what the currently selected message
or file area is or other system messages. If your BBS or door does this you
will need to define a Text View Window somewhere on the screen using the
command Text_View_Window(X1,Y1,X2,Y2) or #255#126#252X1,Y1,X2,Y2#255....
In some cases, your BBS or door program will require MAXterm and Mini-MAX
to emulate a regular ANSI/ASCII terminal program. MAXterm and Mini-MAX will
respond to the same command strings that RIPterm does to throw it back into
text mode, see below:
RIP To Text: Command #1 = #13#10 (Blank Line)
Command #2 = !|1K|*|#|#|# (Plus a #13)
Again, the first command may not be sent by all BBS and door programs, keep
in mind though that MOST of them do. The second command is the one that you
should focus on. The second command will instruct MAXterm to pop up a new
window on the screen that supports 80x25x16 resolution using font type #3.
Font type #3 is needed so the program can display high ASCII characters.
Any time you need to throw MAXterm back into graphics mode, simply send
the commands defined in the "RIP Clear Screen" section.
The Animate Mode:
─────────────────
MAXterm and Mini-MAX both support what is called an "Animate" mode. This is
similar to the "Wait State" mode with the exception that there is complete
interaction between the BBS or door program and the terminal program. This
mode causes a significant amount of "Drag" on the system as a whole because
both programs are reading from and writing to the comport in an alternating
fashion. I'm sure you can see the advantage here, this will allow a person
to simulate online multi-tasking as well as bi-directional protocols. What
you would do instead of ending your screen or routine with the End_Screen()
or #255#126#254#255 command, you would end it with the Animate() command or
with the #255#126#253#255 MAXcontrol code.
While in Animate mode, all commands sent to the comport must be MAXcontrol
commands as to eliminate as much drag on the system as possible. Any other
characters sent to the port will be accepted as standard text.
External Font Files:
────────────────────
MAXterm, Mini-MAX and the MAX Graphics development kit all use the GEM font
format. GEM fonts are used by a large number of programs such as NeoPaint
and NeoBook from NeoSoft and any other program developed with the GX-Text
programming kit by Genus Microprogramming. There are also a few utilities
out there to convert Windows fonts to GEM format. This gives you an endless
amount of available fonts to use in your screens and MAX Graphics compatible
programs. For lots of GEM fonts and other GEM font utilities, please call
the BBS number listed at the end of this document.
───────────────────────────────────────────────────────────────────────────────
MAX Graphics Limitations:
─────────────────────────
A - Minimum/Maximum X1,Y1,X2,Y2 coordinates are 0,0,639,479 but should
be limited to 0,21,639,458 to allow for a status bar at the top and
bottom of the screen set to a 20 pixel height.
B - Colors range from 0 to 255 with colors 0 though 16 matching the same
colors found in the ANSI color palette.
C - Color number 255 in icon files is transparent.
D - Maximum items per picklist is 800 with a 75 character width.
E - Maximum text lines for the text editor or text reader is 110 lines.
F - The maximum number of active windows at any one time is 30.
G - The maximum number of buttons per window is 30.
H - The maximum number of entry fields per window is 30.
MAXscript and MAXcontrol Command Library:
─────────────────────────────────────────
After your BBS or door program has determined whether or not the user has
RIP capabilities, you send the string #255#126#127#255 to the comport. If
the caller has MAXscript and MAXcontrol capabilities, it will return the
the MAXscript version number it supports in the format #.## ....From here
you will tell your program "YES" there is FULL remote MAX Graphics support.
AddTo_PickList('Text String')
MAXcontrol: #255#126#149'Text String'#255
This command adds items to the picklist. The maximum number
of items in a picklist is 800. Each item should be less than
or equal to 75 characters wide. If it is longer, the excess
length will simply be truncated.
See Also: New_PickList(), SetUp_PickList(), Reset_PickList()
Animate()
MAXcontrol: #255#126#253#255
This throws MAXterm and Mini-MAX into what is referred to as
an "Animated Wait State" This command should be used with
extreme caution because of the amount of drag it puts on the
host and the terminal. This will cause the host and terminal
to read and write to the comport in an alternating fashion.
This allows you to simulate online multi-tasking and can be
used to integrate bi-directional protocols.
See Also: End_Screen()
Bar(X1,Y1,X2,Y1)
MAXcontrol: #255#126#159X1,Y1,X2,Y1#255
This command draws a solid filled rectangle on the screen
defined by the X1,Y1,X2,Y2 coordinates with the currently
selected color and fill style selected by Set_Fill_Style().
See Also: Set_Fill_Style(), Rectangle()
Change_Field(FieldNumber)
MAXcontrol: #255#126#152FieldNumber#255
This command will tell your program to make a new Entry
Field active. After this command is issued, you need to
issue the command Redraw_Field() to make the change take
effect.
See Also: Entry_Field(), Redraw_Field()
Clear_Screen(Color)
MAXcontrol: #255#126#161Color#255
This command will clear the screen from 0,21,639,458 in the
color determined by the "Color" variable. This command will
not touch the top and bottom status bars.
Draw_Backdrop('IMAGE.FIL')
MAXcontrol: #255#126#166'IMAGE.FIL'#255
This command should be the first command called in the first
MAX screen file in your BBS. This _MUST_ be called before any
Draw_Window() command, otherwise the previous screen backdrop
will be replaced with the first RIP Clear Screen command or
the first Kill_Window() command. You don't have to use this
if you don't want to, this is only used if you want to have
some kind of custom bitmapped image displayed to the user in
the background while they are online. The backdrop image will
be plotted starting at 0,21 and will be cropped if the image
exceeds the 639,458 lower screen limit.
Draw_Button(X1,Y1,PixelWidth,HotKey,UseIcon,Icon#,'ButtonTitle')
MAXcontrol: #255#126,#130X1,Y1,PixelWidth,HotKey,UseIcon,Icon#,'ButtonTitle'#255
This command draws a standard raised button on the screen
at X1/Y1 coordinates. This type of button has a predefined
height of 20 pixels. You define the width of the button with
the PixelWidth variable. This width is intentionally not
predefined so you can create a more customized look to the
screens you create. The HotKey variable determines the key's
(ASCII Value) that needs to be pressed to make MAXterm return
the Button # value. With no buttons on the screen, the button
value is zero. If this is the first button on the screen, the
button value will return a 1, if it's the second button, it
will return a 2, and so on. The UseIcon variable tells MAXterm
whether or not to plot a 16x16 (Small Icon Type) icon on the
button (0=No,1=Yes). The Icon# variable determines the icon
number in the currently selected 16x16 icon library file.
See Also: Small_Icon_LIB(), Radio_Button()
Draw_Circle(X1,Y1,Radius,Color)
MAXcontrol: #255#126#158X1,Y1,Radius#255
This command draws circle on the screen inside with the
X1,Y1 coordinates being the center of the circle. Radius
is the amount of pixels from the center to the outmost
edge of the circle. The color of the cirle is determined
by the "Color" variable. The circle can be filled with a
a color and pattern of your choice. See the Flood_Fill()
command for more information.
See Also: Flood_Fill(), Set_Fill_Style()
Draw_Line(X1,Y1,X2,Y2,Color)
MAXcontrol: #255#126132X1,Y1,X2,Y2,LineColor#155
This command draws a line from X1,Y1 to X2,Y2 in the color
specified by the variable "Color".
Draw_Rectangle(X1,Y1,X2,Y2,Color)
MAXcontrol: #255#126#162X1,Y1,X2,Y2#255
This command is similar to the Bar() command with the small
exception that there is no fill, this is just a frame. You
can still fill the rectangle with the Flood_Fill() command
if you wish. The color of the frame is determined by the
variable "Color".
See Also: Flood_Fill(), Set_Fill_Style()
Draw_Window(X1,Y1,X2,Y2,WindowType,HeaderText)
MAXcontrol: #255#126#128100,100,630,380,WindowType,'WindowTitle'#255
This command draws a window at X1,Y1,X2,Y2 the coordinates.
WindowType defines which type of window to display on the
user's screen. There are four window types at this time:
1 - Standard Block Window
2 - Invisible Window
3 - Flat Panel Window
4 - Semi-Transparent Window
Any setting outside of these ranges will cause the program
to default to window type #1.
See Also: Kill_Window(), Text_View_Window()
End_Screen()
MAXcontrol: #255#126#254#255
This command is used in either screen files or BBS or door
programs to throw MAXterm into its "Wait State" mode. This
command or the Animate() command must be issued at the end
of EVERY screen file or when ever your BBS or door program
is finished drawing.
See Also: Animate()
Entry_Field(X1,Y1,EntryType,Width,'DefaultText')
MAXcontrol: #255#126#131X1,Y1,EntryType,Width,'DefaultText'#255
This command plots an entry field on the screen at X1/Y1
coordinates. This is only meant to be used with BBS or
door programs due to the way it returns the text entered
in the fields. However, you can still use these in your
screens for purely cosmetic purposes. There are six types
of EntryTypes: 0 - Normal String
1 - Numeric String
2 - Proper String
3 - Date String
4 - Phone Number
5 - File Name
After all of you items have been drawn in the window you
will issue the End_Screen() or Animate() commands which
will activate the scrolling of the Entry_Fields. In some
part of your program you will have to execute the command
Get_Field_Data() after the user clicks a button which is not
a Picklist or Text File Reader scroll button. This will tell
MAXterm to send the string from each field to the comport in
a fashion similar to a MAXcontrol code. Th entry fields are
numbered 1..30 (30 maximum) as they are drawn on the screen
and text strings will be returned to your BBS or door like:
#255#126#251FieldTextString#255 in sequential fashion.
See Also: Get_Field_Data()
Flood_Fill(X1,Y1,BorderColor)
MAXcontrol: #255#126#165X1,Y1,BorderColor#255
This command fills an area starting at the X1/Y1 coordinates
using the color and fill determined by the Set_Fill_Style()
command. The BorderColor variable determines the color of
the lines (or borders) where you want the fill to stop at.
Say you used the command Draw_Circle(100,100,50,64). The
border of the circle is in color #64. After you determine
the color and style of the fill with Set_Fill_Style(), you
would use Flood_Fill(100,100,64) to fill the circle to its
borders or any other overlapping shapes so long as their
borders are in color # 64 as well.
See Also: Set_Fill_Style(), Draw_Rectangle(), Draw_Circle()
Frame_High(X1,Y1,X2,Y2)
MAXcontrol: #255#126#144X1,Y1,X2,Y2#255
This command simply draws a pseudo 3-D frame on the screen
at the X1,Y1,X2,Y2 coordinates that appears to be raised.
Meaning the top and left side of the frame are brighter
than the bottom and right sides.
See Also: Frame_Low()
Frame_Low(X1,Y1,X2,Y2)
MAXcontrol: #255#126#145X1,Y1,X2,Y2#255
This command is the opposite of the Frame_High() command.
This draws a frame on the screen at X1,Y1,X2,Y2 that
appears to be lowered.
See Also: Frame_High()
Get_Editor_Text()
MAXcontrol: #255#126#249#255
This command is used to send the text saved to the text file
created by the text editor. The text is sent in the form of
a character by character transfer with a #13 at the end of
every line to indicate a line feed.
See Also: New_Text_Editor(), Run_Text_Editor()
Get_Field_Data()
MAXcontrol: #255#126#250#255
This command is NEVER to be used in anything but a BBS or a
door program. NEVER use this command in screen files! If your
program uses entry fields for anything, then you will need a
way of getting the field data from the user's terminal back
to your program. For every entry field on the user's screen,
this command will cause the remote's terminal program to send
a #255#126#251FieldTextString#255 for every entry field on
the user's screen in the same order as they were drawn.
See Also: Entry_Field()
Hide_Mouse()
MAXcontrol: #255#126#139#255
This command hides the mouse cursor from view. This is
important to do before you do any drawing or text plotting
of any kind. If you don't, the user will end up with a
blemish on the screen as soon as they move their mouse.
See Also: Show_Mouse()
Kill_Window()
MAXcontrol: #255#126#129#255
This command is mainly used in BBS or door programs designed
around MAX Graphics. Any time you use Draw_Window(), you must
use Kill_Window() unless you are creating screens. Any time a
new screen is sent, the RIP clear screen command is sent prior
to the screen file. This does a global Kill_Window in MAXterm,
so you don't have to worry about using this in your screens.
The reason for this command is so you can kill any window you
have created in order to restore that portion of the screen
and also restore buttons/fields/picklists/editor/reader/etc
that may happen to exist in the previous window (if any).
See Also: Draw_Window(), Text_View_Window()
Large_Icon_LIB('FILENAME.003')
MAXcontrol: #255#126#135'FILENAME.003'#255
This tells MAXterm to change icon library files for its
"Large" (60x60) icons. All Large icon libraries have an
extension of "003"....If the extension is any different,
the default icon library will be used.
See Also: Medium_Icon_LIB(), Small_Icon_LIB(),
Put_Large_Icon()
Load_Font('FILENAME.GFT')
MAXcontrol: (#255#126#148'FILENAME.GFT'#255
This command will dispose of the currently loaded GEM
font file in memory and load a new one. GEM font files
must have the "GFT" file extension or the font file
will not be loaded. These are the user defined fonts
and referred to as FontType #4.
See Also: Standard_Text(), Shadow_Text()
Load_Text_File('FILENAME.TXT')
MAXcontrol: #255#126#167'FILENAME.TXT'#255
This command is used to load a text file into the buffer
used by the text reader and text editor. This command is
called _AFTER_ the call to New_Text_Reader() and after
the call to New_Text_Editor(). Note: You don't have to
load a text file into the text editor if you don't want
to. Run_Text_Editor() and Show_Text_Page() are called
_AFTER_ this command. This file must exist in the user's
\RESOURCE\ or \SESSION\ subdirectories. MAXterm will
look for this file in the \SESSION\ subdirectory first.
Note: The text buffer only allows for 110 lines of text.
See Also: New_Text_Editor(), New_Text_Reader(),
Run_Text_Editor(), Show_Text_Page()
Lowered_Box(X1,Y1,X2,Y2)
MAXcontrol: #255#126#147X1,Y1,X2,Y2#255
This command draws a box on the screen at that appears to
be lowered at the X1,Y1,X2,Y2 coordinates.
See Also: Raised_Box()
Medium_Icon_LIB('FILENAME.002')
MAXcontrol: #255#126#134'FILENAME.002'#255
This tells MAXterm to change icon library files for its
"Medium" (30x30) icons. All Medium icon libraries have an
extension of "002"....If the extension is any different,
the default icon library will be used.
See Also: Small_Icon_LIB(), Large_Icon_LIB(),
Put_Medium_Icon()
Mouse_Mask(MaskNumber)
MAXcontrol: #255#126#141MaskNumber#255
This command changes the "Mask" of the mouse cursor. There
are a total of 19 mouse masks: 0 - Standard Arrow
1 - Up Arrow
2 - Down Arrow
3 - Left Arrow
4 - Right Arrow
5 - Check Mark
6 - Up Hand
7 - Down Hand
8 - Left Hand
9 - Right Hand
10 - Stop Hand
11 - Hour Glass
12 - Diagonal Cross
13 - Rectangular Cross
14 - Rectangular Box
15 - Target Cross
16 - Target Circle
17 - Target Box
18 - Question Mark
Any number outside of these ranges will cause the
mouse mask to default to zero.
See Also: Hide_Mouse(), Show_Mouse()
New_PickList(X1,Y1,OnScreen,Width)
MAXcontrol: #255#126#168X1,Y1,OnScreen,Width#255
This command initializes the scrolling picklist on the
screen and allocates memory for it. The upper left corner
of the picklist will be at X1/Y1 coordinates. The OnScreen
variable determines how many items (in rows) will appear
on the screen, and the Width variable determines how wide
(in characters) the picklist will be. There are however a
couple rules you must follow when using picklists in your
screens and programs. The picklist MUST be the first item
in the window. When you are in your repeat loop initiated
by End_Screen() or Animate() the top scroll button in the
picklist with return 1 and the other will report two. All
other buttons added to the screen after the picklist will
return values from 3 on up.
See Also: AddTo_PickList(), SetUp_PickList, Reset_PickList()
New_Text_Editor(Y1)
MAXcontrol: #255#126#154Y1#255
This command initiates the text editor on the screen. You
will notice that there only a Y1 coordinate because the
text field takes up the whole width of the screen. You'll
need to call Draw_Window() before this for two reasons...
The first reason is because you will most likely want to
have some kind of a header to display what the text file
or message is that is being edited. The second reason is
because you will need to save the entire screen before
you plot the editing field on the screen. That way when
the user is done with their editing, you can make a call
to Kill_Window() to restore the entire screen. After you
call this command, you may optionally stuff the buffer
with text from a text file. See Load_Text_File() for more
information.
See Also: Draw_Window(), Kill_Window(),
Load_Text_File(), Run_Text_Editor()
New_Text_Reader(Y1)
MAXcontrol: #255#126#156#Y1#255
As with the New_Text_Editor command, this command uses
only the Y1 coordinate because the text file reader takes
up the whole width of the screen. All of the same rules
as the New_Text_Editor command apply here. You will need
to issue a command to Draw_Window() to save the previous
screen. See Load_Text_File() for more information.
See Also: New_Text_Editor(), Draw_Window(),
Kill_Window(), Show_Text_Page()
Play_Sound('SOUND.FIL')
MAXcontrol: #255#126#163'SOUND.FIL'#255
This command plays 1 of three types of sound files through
the user's sound card. Supported sound formats are MOD,
MID (MIDI), and VOC....The user MUST have the environment
variable set for their sound card for this function to work
for them. MOD and MID (MIDI) files can play in a repeating
fashion will the user does something else.
Put_Image(X1,Y1,'IMAGE.FIL')
MAXcontrol: #255#126#164X1,Y1,'IMAGE.FIL'#255
This command displays a graphics image on the screen at the
X1,Y1 coordinates. PCX, BMP, and JPG (JPEG) image files are
supported. GIF files are not supported thanks to CompuServe.
Put_Large_Icon(X1,Y1,IconNumber)
MAXcontrol: #255#126#136X1,Y1,IconNumber#255
Plots a "Large" (60x60) icon at the X1/Y1 coordinates.
IconNumber is the zero based record number of the icon
in the currently selected Large_Icon_LIB. If the icon
number you select IconNumber is larger than the amount
of icons in the library (minus 1), then icon #0 will
be used instead.
See Also: Put_Small_Icon(), Put_Medium_Icon(),
Large_Icon_LIB()
Put_Medium_Icon(X1,Y1,IconNumber)
MAXcontrol: #255#126#137X1,Y1,IconNumber#255
Plots a "Medium" (30x30) icon at the X1/Y1 coordinates.
IconNumber is the zero based record number of the icon
in the currently selected Medium_Icon_LIB. If the icon
number you select IconNumber is larger than the amount
of icons in the library (minus 1), then icon #0 will
be used instead.
See Also: Put_Small_Icon(), Put_Large_Icon(),
Medium_Icon_LIB()
Put_Small_Icon(X1,Y1,IconNumber)
MAXcontrol: #255#126#138X1,Y1,IconNumber#255
Plots a "Small" (16x16) icon at the X1/Y1 coordinates.
IconNumber is the zero based record number of the icon
in the currently selected Small_Icon_LIB. If the icon
number you select IconNumber is larger than the amount
of icons in the library (minus 1), then icon #0 will
be used instead.
See Also: Put_Medium_Icon(), Put_Large_Icon(),
Small_Icon_LIB()
Raised_Box(X1,Y1,X2,Y2)
MAXcontrol: #255#126#146X1,Y1,X2,Y2#255
This command draws a box on the screen at that appears to
be raised at the X1,Y1,X2,Y2 coordinates. This is basically
a Flat Panel Window with no screen saving abilities.
See Also: Lowered_Box()
Redraw_Field()
MAXcontrol: #255#126#153#255
This command must be issued immediately after a call to the
Change_Field() command.
See Also: Entry_Field(), Change_Field()
Reset_PickList(ItemNumber)
MAXcontrol: #255#126#151#255
This command resets the highlight bar in the picklist to a
specified picklist item. You issue this command and then
issue the SetUp_PickList() command.
See Also: New_PickList(), AddTo_PickList(), SetUp_PickList()
Reset_Remote()
MAXcontrol: #255#126#169#255
This command is used to reset all colors and file names in
the remote's terminal program to their default values. See
the section of this document on MAXcolor codes.
Run_Text_Editor()
MAXcontrol: #255#126#155#255
This command must be issued ONLY after the New_Text_Editor()
command has been issued.
See Also: New_Text_Editor
Set_Fill_Style(Pattern,Color)
MAXcontrol: #255#126#160Pattern,Color#255
This sets the fill style to be used to fill in the center
of a Bar or Circle. A setting of zero will cause the shape
to be drawn on the screen with just the frame being set by
the "Color" variable. There are 12 different fill styles:
0 - No Fill
1 - Solid Fill
2 - Line Fill
3 - Light Slash Fill
4 - Heavy Slash Fill
5 - Heavy Back Slash Fill
6 - Light Back Slash Fill
7 - Light Cross Hatch
8 - Heavy Cross Hatch
9 - Interleave Fill
10 - Wide Dot Fill
11 - Close Dot Fill
Any number outside of these ranges will cause the fill
style to default to zero.
See Also: Bar(), Circle(), Polygon()
SetUp_PickList()
MAXcontrol: #255#126#150#255
After the picklist has been initialized with New_PickList()
and has had items added to it with AddTo_PickList(), it is
now ready to run in the mouse loop. This command tells the
program that you are finished adding items to the picklist
and that it is now ready. When using picklists you need to
remember that the picklist always adds two buttons to the
beginning of your screen. The current item in the picklist
with the highlight bar on it is returned in the variable
PickInfo.Current in the MAX Graphics interface unit. Should
you wish to return that text into your program, you would
access it as PickList[PickInfo.Current]....
See Also: New_PickList(), AddTo_PickList(), Reset_PickList()
Show_Mouse()
MAXcontrol: #255#126#140#255
Any time a call to Hide_Mouse() is called, you will need
to call this command to re-enable the users mouse.
See Also: Hide_Mouse()
Show_Text_Page()
MAXcontrol: #255#126#157#255
This command must be issued ONLY after the New_Text_Reader()
command has been issued.
See Also: New_Text_Reader
Small_Icon_LIB('FILENAME.001')
MAXcontrol: #255#126#133'FILENAME.001'#255
This tells MAXterm to change icon library files for its
"Small" (16x16) icons. All Small icon libraries have an
extension of "001"....If the extension is any different,
the default icon library will be used.
See Also: Medium_Icon_LIB(), Large_Icon_LIB(),
Put_Small_Icon()
Standard_Text(X1,Y1,TextColor,FontType,'Your Text')
MAXcontrol: #255#126#142X1,Y1,TextColor,FontType,'Your Text'#255
This command is used to plot text at the X1/Y1 coordinates
on the screen. TextColor is the color of your text and
FontType is the type of font you want you text printed
in. FontTypes are: 1 - 5x8 bitmapped font
2 - GEM "System" font
3 - 8x14 ROM resident font
4 - External GEM font
See Also: Shadow_Text(), Load_Font()
Shadow_Text(X1,Y1,TextColor,ShadowColor,FontType,'Your Text')
MAXcontrol: #255#126#143TextColor,ShadowColor,FontType,'Your Text'#255
This is command is similar to Standard_Text() except this
command plots your text with a shadow behind it. You simply
define two colors here instead of just one....
FontTypes are: 1 - 5x8 bitmapped font
2 - GEM "System" font
3 - 8x14 ROM resident font
4 - External GEM font
See Also: Standard_Text(), Load_Font()
Text_View_Window(X1,Y1,X2,Y2)
MAXcontrol: #255#126#252X1,Y1,X2,Y2#255
This command can be used in screen files or BBS and door
programs. The reason for this function is that there are
some BBS programs that create dynamically generated text
after the screens are drawn. This text is most generally
to tell the user what the active file or message area is
or to send the user general system info or warnings. You
would use this command to define a window on the screen
where you want this information displayed. You will have
to use Kill_Window() to destroy this window in your BBS
or door program. If this is used in a screen file, then
the standard RIP clear screen command will get rid of it.
See Also: Draw_Window(), Kill_Window()
───────────────────────────────────────────────────────────────────────────────
TO BE CONTINUED: (More Commands Are Sill Being Added)
───────────────────────────────────────────────────────────────────────────────
MAXcolor Variables:
───────────────────
You can remotely change the colors used in the user's terminal program for
drawing graphics primitives. However, there are no text based counterparts
to these commands in order to retain the highest possible speed. These are
similar to MAXcontrol commands, the exception to the rule is that the #126
in MAXcontrol is replaced by a #125, all MAXcolor variables start at #127.
For a better description of what each variable is used for, please see the
file SVGAUNIT.PAS in the MAX Graphics development kit.
Win1Back = #255#125#127ColorNumber#255
Win4Back = #255#125#128ColorNumber#255
Win1High = #255#125#129ColorNumber#255
Win4High = #255#125#130ColorNumber#255
Win1Low = #255#125#131ColorNumber#255
Win4Low = #255#125#132ColorNumber#255
Win1Frame1 = #255#125#133ColorNumber#255
Win1Frame2 = #255#125#134ColorNumber#255
Win4Frame = #255#125#135ColorNumber#255
ActiveHdr = #255#125#136ColorNumber#255
InactiveHdr = #255#125#137ColorNumber#255
HdrTitle = #255#125#138ColorNumber#255
ButtonFrame = #255#125#139ColorNumber#255
ButtonFace = #255#125#140ColorNumber#255
ButtonHigh = #255#125#141ColorNumber#255
ButtonLow = #255#125#142ColorNumber#255
ButtonHot = #255#125#143ColorNumber#255
ButtonText = #255#125#144ColorNumber#255
FrameHigh = #255#125#145ColorNumber#255
FrameLow = #255#125#146ColorNumber#255
BoxBack = #255#125#147ColorNumber#255
BoxHigh = #255#125#148ColorNumber#255
BoxLow = #255#125#149ColorNumber#255
FieldTextHigh = #255#125#150ColorNumber#255
FieldTextLow = #255#125#151ColorNumber#255
FieldBack = #255#125#152ColorNumber#255
FieldFrame = #255#125#153ColorNumber#255
FieldHigh = #255#125#154ColorNumber#255
QuoteColor = #255#125#155ColorNumber#255
MsgColor = #255#125#156ColorNumber#255
TearColor = #255#125#157ColorNumber#255
FlagColor = #255#125#158ColorNumber#255
MsgIDcolor = #255#125#159ColorNumber#255
TextBack = #255#125#160ColorNumber#255
PickHighFore = #255#125#161ColorNumber#255
PickHighBack = #255#125#162ColorNumber#255
EditorFrame = #255#125#163ColorNumber#255
ScreenColor = #255#125#164ColorNumber#255
───────────────────────────────────────────────────────────────────────────────
Larry L. Athey
1239 Cheyenne
Alliance, NE, 69301
Owner : BBS Utiliteez Software
FAX/BBS #: (308)762-2239
FidoNet : 1:285/703
GDS-Net : 100:1010/1
ivNET : 411:1500/0
Internet : larry.athey@tos.daphnis.com, larry.athey%otherside@ivsoft.com